#pragma once

#include <vector>
#include "Contact.h"
#include <QMetaType>

namespace kryptos { namespace entities {

class Group
{
public:

    enum GroupType { RSA, VERNAM};

    Group();
    Group(const std::string& name, GroupType type);
    Group(const std::string& name, GroupType type, ContactList members);
    virtual ~Group();

    void addMember(const Contact& contact);

    bool hasMember(const Contact& contact);

    std::string name() const;
    GroupType   type() const;
    ContactList members() const;

private:

    std::string m_name;
    GroupType   m_type;
    ContactList m_members;

};

typedef std::vector<Group> GroupList;
}}

Q_DECLARE_METATYPE(kryptos::entities::Group)
Q_DECLARE_METATYPE(kryptos::entities::GroupList)

